﻿@page
@using WXWorkSvc.Models
@model WXWorkSvc.Areas.Admin.Pages.Agent.UserListModel
@inject WXWork3rd wx;
@{
    ViewData["Title"] = "用户";
    var rowIndex = 1;
}
<nav aria-label='breadcrumb'>
    <ol class='breadcrumb'>
        <li class='breadcrumb-item'><a asp-page="./Index">第三方应用</a></li>
        <li class='breadcrumb-item active' aria-current='page'>
            @ViewBag.Title
        </li>
    </ol>
</nav>
<table class="table table-striped">
    <thead>
        <tr>
            <th>#</th>
            <th>@Html.DisplayNameFor(ii => ii.Items[0].UserId)</th>
            <th>姓名</th>
            <th>@Html.DisplayNameFor(ii => ii.Items[0].Roles)</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.Items)
        {
            <tr>
                <td>@(rowIndex++)</td>
                <td>@Html.DisplayFor(ii => item.UserId)</td>
                <td><ww-open-data type="userName" openid="@item.UserId"></ww-open-data></td>
                <td>@Html.DisplayFor(ii => item.Roles)</td>
                <td><a asp-page="./Edit" asp-route-id="@item.UserId">do something...</a></td>
            </tr>
        }
    </tbody>
</table>
@section scripts
{
    @Html.Raw(await wx.GetAgentJsConfigAsync(Request))
}
